home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / STRINGS.SWG / 0007_ST-CASE1.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  1KB  |  42 lines

  1. today class we are looking at some String routines. Routines to
  2. convert Strings to upper Case, lower Case,etc.
  3.  
  4. Remember to turn off CHECK String Var PARAMETER LENGTHS With {$V-}
  5. beFore calling the String Procedures. Turn it back on after calling
  6. this proc.
  7.  
  8. {--[UPPER CASinG StringS]--}
  9.  
  10. Procedure UPCaseL(Var CString:String);
  11.  
  12. Var I:Byte;
  13.  
  14.  begin
  15.    For I:=1 to LENGTH(CString) do CString[I]:=UPCase(CString[I])
  16.  end;
  17.  
  18. {--[LOWER CASinG CharS]--}
  19.  
  20. Function DWNCase(DWNCH:Char):Char;
  21.  
  22. begin
  23. if ('A' <= DWNCH) and (DWNCH <= 'z') then DWNCase:=CHR(orD(DWNCH)+32)
  24. end;
  25.  
  26. {--[LOWER CASinG StringS]--}
  27.  
  28. Procedure DWNCaseL(Var CString:String);
  29.  
  30. Var I:Byte;
  31.  
  32. begin
  33.   For I:=1 to LENGTH(CString) do CString[I]:=DWNCase(CString[I])
  34. end;
  35.  
  36. --------------
  37. if you are offended at the subject line, then please don't read the
  38. message. if you think that I, TL, am calling you an idiot because my
  39. subject line said IDIOT PASCAL LESSONS and you read this message...
  40. well, hey, I'm not.
  41. -------------
  42.